package loengud.w11;

public class ThreadsStartExample {

	public static void main(String[] args) {
		new ThreadExample().start();
		//new ThreadExample().run();
		new Thread(new RunnableExample()).start();
		System.out.println("main ends");
	}

}
class ThreadExample extends Thread {

	@Override
	public void run() {
		for (int i = 0; i < 100; i++) {
			System.out.println("Thread: " + i);
		}
	}
	
}

class RunnableExample implements Runnable {
	
	@Override
	public void run() {
		for (int i = 0; i < 100; i++) {
			System.out.println("Runnable: " + i);
		}
	}
}